package com.example.day21;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

/**
 * @author Lenovo
 */
public class SendDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        byte[] bys = "你好".getBytes();
        DatagramPacket dp = new
                DatagramPacket(bys,bys.length, InetAddress.getByName("192.168.1.66"),10086);
        ds.send(dp);
        ds.close();
    }

}
